﻿using System.Data;

namespace Mite.MsSql
{
	public class MsSqlColumn : Column
	{
		public MsSqlColumn(string name, SqlDbType sqlDataType, uint precision, uint scale, bool isIdentity, bool isPrimaryKey,
		                   bool isNullable, bool isIndex)
		{
			_sqlDataType = sqlDataType;
			Name = name;
			base.isIdentity = isIdentity;
			base.isNullable = isNullable;
			Scale = scale;
			base.isIndex = isIndex;
			Precision = precision;

			if (isPrimaryKey)
				PrimaryKey();
		}

		private readonly SqlDbType _sqlDataType;
	}
}